package com.wangcp.strategy.strategy02;
/**
* 打折收费子类
* @author wangcp
* @date 2021/12/17 16:52
**/
public class CashRebate extends CashSuper{

    // 折扣
    private double moneyRebate = 1;


    public CashRebate(double moneyRebate) {
        this.moneyRebate = moneyRebate;
    }

    @Override
    public double acceptCash(double money) {
        return money * moneyRebate;
    }
}
